<?php

namespace App\Http\Requests\Admin\System;



use App\Http\Requests\BaseFormRequest;
use Illuminate\Validation\Rule;

class RoleSaveFormRequest extends BaseFormRequest
{
    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        $id = $this->get('id', 0);
        return [
            'name' => [
                'required',
                'between:2,50'
            ],
            'desc' => [
                'between:0,255'
            ]
        ];
    }

    public function messages()
    {
        return __('system.role.validation');
    }
}
